<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="../vue_lib/vue.js"></script>
    <title>Title</title>
</head>
<body>
<div id="app">
  <button-counter></button-counter>
    <test></test>
</div>
<script>
    Vue.component(
        'button-counter',
        {
            props:['title'],
            data:function () {
                return {}

            },
            template: '<h1>全局变量</h1>'
        })
</script>
<script>
    var vm = new Vue({
        el:"#app",
        data:{

        },
        components:{
            test:{
                template: '<h1>局部组件</h1>'
            }

        }
    })
</script>
</body>
</html>